package drawingBoard.tool;

import drawingBoard.ImageFrame;

import java.awt.Graphics;

//import drawing.ImageFrame;

//直线工具
public class LineTool extends AbstractTool {
	private static Tool tool = null;

	private LineTool(ImageFrame frame) {
		super(frame);
	}

	public static Tool getInstance(ImageFrame frame) {
		if (tool == null) {
			tool = new LineTool(frame);
		}
		return tool;
	}

	//画图形
	public void draw(Graphics g, int x1, int y1, int x2, int y2) {
		g.drawLine(x1, y1, x2, y2);
	}
}
